import {request} from "@/utils/request";
import type {SuggestItem} from "@/types/search";

/**
 * 搜索建议
 */
export const getSuggestListApi = (keyword: string) => {
    return request<SuggestItem[]>({
        method: 'GET',
        url: '/suggest',
        data: {
            keyword
        }
    })
}

/**
 * 获取搜索页搜索建议
 */
export const getSearchSuggestListApi=()=>{
    return request<SuggestItem[]>({
        method:'GET',
        url:'/search/suggest'
    })
}